home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Periodicals / develop / develop 4 code / Poly. in Code Resources / Virtual WDEF / Relocatable.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-07-24  |  555 b   |  27 lines  |  [TEXT/MPS ]

  1. /*
  2.     Relocatable.h
  3.     
  4.     Base class to provide utilities for type-safe handling of
  5.     handle-based objects.
  6.     
  7.     by Patrick C. Beard.
  8.  
  9.     ©1989,90 by Patrick Beard.
  10.  */
  11.  
  12. #ifndef __RELOCATABLE__
  13. #define __RELOCATABLE__
  14.  
  15. #include <Memory.h>
  16.  
  17. class Relocatable : HandleObject {
  18. protected:
  19.     void Lock() { HLock((Handle)this); }
  20.     void Unlock() { HUnlock((Handle)this); }
  21.     void MoveHigh() { MoveHHi((Handle)this); }
  22.     SignedByte GetState() { return HGetState((Handle)this); }
  23.     void SetState(SignedByte flags) { HSetState((Handle)this, flags); }
  24. };
  25.  
  26. #endif __RELOCATABLE__
  27.